
#include <stdarg.h>

int xs_power(int x)
{
    if(x < 0)
        return 0;
    int i=1;
    x --;
    while((x+1) & x)
    {
        x |= (x>>i);
        i <<= 1;
    }
    return x+1;
}

int xs_add(int argc, ...)
{
    va_list ap;
    int i, total = 0;
	
    va_start(ap, argc);
    for(i=0; i<argc; i++)
		total += va_arg(ap, int);
    va_end(ap);

    return total;
}





